﻿using UnityEngine;
using System.Collections;

public class LevelUpSelectCompleteButton : MonoBehaviour {
	void OnClick()
	{
//        UnitStateChangeResultManager.prevUnitLevel = MyInfo.Instance.GetUnitInfoById(MyInfo.Instance.LastSelectedUnitDBID).UnitLevel;
//        LoadingWindow.window.ShowShortLoading();
//		RestAPI.singleton.SendUnitComposeResult(ReturnCallback);
	}
			
	void ReturnCallback(Hashtable returnData)
	{
        LoadingWindow.window.HideLoading();
		UnitStateChangeResultManager.isLevelUp = true;
		if( returnData.ContainsKey("NewUnitClassId") )
			UnitStateChangeResultManager.newUnitClassId = int.Parse(returnData["NewUnitClassId"].ToString());
		CSceneManager c = GameObject.FindObjectOfType(typeof(CSceneManager)) as CSceneManager;
			c.GoToUnitUpResultScene();
	}
}
